package com.xuzhiguang.baidu.pan.sdk.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

/**
 * @author xuzhiguang
 * @date 2020/6/27 4:30
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
@JsonIgnoreProperties(ignoreUnknown = true)
public class UploadPartUploadParams {

    /**
     * 固定值 upload
     */
    private String method;

    /**
     * 固定值 tmpfile
     */
    private String type;

    /**
     * 上传后使用的文件绝对路径
     */
    private String path;

    /**
     * precreate接口下发的uploadid
     */
    private String uploadid;

    /**
     * 上传的文件
     */
    private byte[] file;
    /**
     * 文件分片的位置序号，参考precreate接口返回的block_list
     */
    private Integer partseq;

    @Override
    public String toString() {
        return "UploadPartUploadParams{" +
                "method='" + method + '\'' +
                ", type='" + type + '\'' +
                ", path='" + path + '\'' +
                ", uploadid='" + uploadid + '\'' +
                ", file=" + file.length +
                ", partseq=" + partseq +
                '}';
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getUploadid() {
        return uploadid;
    }

    public void setUploadid(String uploadid) {
        this.uploadid = uploadid;
    }

    public byte[] getFile() {
        return file;
    }

    public void setFile(byte[] file) {
        this.file = file;
    }

    public Integer getPartseq() {
        return partseq;
    }

    public void setPartseq(Integer partseq) {
        this.partseq = partseq;
    }
}
